<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<title>InFact: infact::FactoryConstructible Class Reference</title>

<link href="tabs.css" rel="stylesheet" type="text/css"/>
<link href="doxygen.css" rel="stylesheet" type="text/css" />

<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<script type="text/javascript">
  $(document).ready(function() { searchBox.OnSelectItem(0); });
</script>

</head>
<body>
<div id="top"><!-- do not remove this div! -->


<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  
  
  <td style="padding-left: 0.5em;">
   <div id="projectname">InFact
   
   </div>
   <div id="projectbrief">Interpreter and factory for easily creating C++ objects at run-time</div>
  </td>
  
  
  
 </tr>
 </tbody>
</table>
</div>

<!-- Generated by Doxygen 1.7.6.1 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Search');
</script>
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Main&#160;Page</span></a></li>
      <li><a href="namespaces.html"><span>Namespaces</span></a></li>
      <li class="current"><a href="annotated.html"><span>Classes</span></a></li>
      <li><a href="files.html"><span>Files</span></a></li>
      <li>
        <div id="MSearchBox" class="MSearchBoxInactive">
        <span class="left">
          <img id="MSearchSelect" src="search/mag_sel.png"
               onmouseover="return searchBox.OnSearchSelectShow()"
               onmouseout="return searchBox.OnSearchSelectHide()"
               alt=""/>
          <input type="text" id="MSearchField" value="Search" accesskey="S"
               onfocus="searchBox.OnSearchFieldFocus(true)" 
               onblur="searchBox.OnSearchFieldFocus(false)" 
               onkeyup="searchBox.OnSearchFieldChange(event)"/>
          </span><span class="right">
            <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
          </span>
        </div>
      </li>
    </ul>
  </div>
  <div id="navrow2" class="tabs2">
    <ul class="tablist">
      <li><a href="annotated.html"><span>Class&#160;List</span></a></li>
      <li><a href="classes.html"><span>Class&#160;Index</span></a></li>
      <li><a href="hierarchy.html"><span>Class&#160;Hierarchy</span></a></li>
      <li><a href="functions.html"><span>Class&#160;Members</span></a></li>
    </ul>
  </div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
<a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(0)"><span class="SelectionMark">&#160;</span>All</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(1)"><span class="SelectionMark">&#160;</span>Classes</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(2)"><span class="SelectionMark">&#160;</span>Namespaces</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(3)"><span class="SelectionMark">&#160;</span>Files</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(4)"><span class="SelectionMark">&#160;</span>Functions</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(5)"><span class="SelectionMark">&#160;</span>Variables</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(6)"><span class="SelectionMark">&#160;</span>Typedefs</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(7)"><span class="SelectionMark">&#160;</span>Enumerations</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(8)"><span class="SelectionMark">&#160;</span>Enumerator</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(9)"><span class="SelectionMark">&#160;</span>Defines</a></div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

  <div id="nav-path" class="navpath">
    <ul>
      <li class="navelem"><a class="el" href="namespaceinfact.html">infact</a>      </li>
      <li class="navelem"><a class="el" href="classinfact_1_1_factory_constructible.html">FactoryConstructible</a>      </li>
    </ul>
  </div>
</div>
<div class="header">
  <div class="summary">
<a href="#pub-methods">Public Member Functions</a>  </div>
  <div class="headertitle">
<div class="title">infact::FactoryConstructible Class Reference</div>  </div>
</div><!--header-->
<div class="contents">
<!-- doxytag: class="infact::FactoryConstructible" -->
<p>An interface simply to make it easier to implement <a class="el" href="classinfact_1_1_factory.html">Factory</a>-constructible types by implementing both required methods to do nothing (use of this interface is completely optional; read more for more information).  
 <a href="classinfact_1_1_factory_constructible.html#details">More...</a></p>

<p><code>#include &lt;<a class="el" href="factory_8h_source.html">factory.h</a>&gt;</code></p>
<div class="dynheader">
Inheritance diagram for infact::FactoryConstructible:</div>
<div class="dyncontent">
 <div class="center">
  <img src="classinfact_1_1_factory_constructible.png" usemap="#infact::FactoryConstructible_map" alt=""/>
  <map id="infact::FactoryConstructible_map" name="infact::FactoryConstructible_map">
<area href="classinfact_1_1_animal.html" title="A very simple class to represent an animal." alt="infact::Animal" shape="rect" coords="88,56,255,80"/>
<area href="classinfact_1_1_date.html" title="An interface to represent a date." alt="infact::Date" shape="rect" coords="354,56,521,80"/>
<area href="classinfact_1_1_person.html" title="An interface representing a person." alt="infact::Person" shape="rect" coords="531,56,698,80"/>
<area href="classinfact_1_1_pet_owner.html" title="An owner of a pet." alt="infact::PetOwner" shape="rect" coords="708,56,875,80"/>
<area href="classinfact_1_1_cow.html" title="A class to represent a cow." alt="infact::Cow" shape="rect" coords="0,112,167,136"/>
<area href="classinfact_1_1_sheep.html" title="A sheep." alt="infact::Sheep" shape="rect" coords="177,112,344,136"/>
<area href="classinfact_1_1_date_impl.html" title="An implementation of the Date interface that can be constructed by a Factory (because of the REGISTER..." alt="infact::DateImpl" shape="rect" coords="354,112,521,136"/>
<area href="classinfact_1_1_person_impl.html" title="A concrete implementation of the Person interface that can be constructed by a Factory (because of th..." alt="infact::PersonImpl" shape="rect" coords="531,112,698,136"/>
<area href="classinfact_1_1_human_pet_owner.html" title="A concrete type of PetOwner that can be constructed by a Factory&lt;PetOwner&gt; instance." alt="infact::HumanPetOwner" shape="rect" coords="708,112,875,136"/>
</map>
 </div></div>

<p><a href="classinfact_1_1_factory_constructible-members.html">List of all members.</a></p>
<table class="memberdecls">
<tr><td colspan="2"><h2><a name="pub-methods"></a>
Public Member Functions</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">virtual&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classinfact_1_1_factory_constructible.html#a71837c2002fe8f555036eed482b105e3">~FactoryConstructible</a> ()</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Destroys this instance.  <a href="#a71837c2002fe8f555036eed482b105e3"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">virtual void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classinfact_1_1_factory_constructible.html#a1c186ded6db298b7a84e5767e87c740f">RegisterInitializers</a> (<a class="el" href="classinfact_1_1_initializers.html">Initializers</a> &amp;initializers)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Registers data members of this class for initialization when an instance is constructed via the <a class="el" href="classinfact_1_1_factory.html#a8b2771ba4fac39a71cb1d0156ddba7b6">Factory::CreateOrDie </a> method.  <a href="#a1c186ded6db298b7a84e5767e87c740f"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">virtual void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classinfact_1_1_factory_constructible.html#abbcefaf8b2137f888ef133807cefe083">PostInit</a> (const <a class="el" href="classinfact_1_1_environment.html">Environment</a> *env, const string &amp;init_str)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Does any additional initialization after an instance of this class has been constructed, crucially giving access to the <a class="el" href="classinfact_1_1_environment.html">Environment </a> that was in use and modified during construction by the <a class="el" href="classinfact_1_1_factory.html#a8b2771ba4fac39a71cb1d0156ddba7b6">Factory::CreateOrDie </a> method.  <a href="#abbcefaf8b2137f888ef133807cefe083"></a><br/></td></tr>
</table>
<hr/><a name="details" id="details"></a><h2>Detailed Description</h2>
<div class="textblock"><p>An interface simply to make it easier to implement <a class="el" href="classinfact_1_1_factory.html">Factory</a>-constructible types by implementing both required methods to do nothing (use of this interface is completely optional; read more for more information). </p>
<p>The <a class="el" href="classinfact_1_1_factory.html">Factory </a> class simply requires its template type to have the two methods defined in this class, and so it is <b>not</b> a <em>requirement</em> that all <a class="el" href="classinfact_1_1_factory.html">Factory</a>-constructible classes derive from this class; they must merely have methods with the exact signatures of the methods of this class. </p>

<p>Definition at line <a class="el" href="factory_8h_source.html#l00549">549</a> of file <a class="el" href="factory_8h_source.html">factory.h</a>.</p>
</div><hr/><h2>Constructor &amp; Destructor Documentation</h2>
<a class="anchor" id="a71837c2002fe8f555036eed482b105e3"></a><!-- doxytag: member="infact::FactoryConstructible::~FactoryConstructible" ref="a71837c2002fe8f555036eed482b105e3" args="()" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">virtual <a class="el" href="classinfact_1_1_factory_constructible.html#a71837c2002fe8f555036eed482b105e3">infact::FactoryConstructible::~FactoryConstructible</a> </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td><code> [inline, virtual]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Destroys this instance. </p>

<p>Definition at line <a class="el" href="factory_8h_source.html#l00552">552</a> of file <a class="el" href="factory_8h_source.html">factory.h</a>.</p>

</div>
</div>
<hr/><h2>Member Function Documentation</h2>
<a class="anchor" id="abbcefaf8b2137f888ef133807cefe083"></a><!-- doxytag: member="infact::FactoryConstructible::PostInit" ref="abbcefaf8b2137f888ef133807cefe083" args="(const Environment *env, const string &amp;init_str)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">virtual void <a class="el" href="classinfact_1_1_factory_constructible.html#abbcefaf8b2137f888ef133807cefe083">infact::FactoryConstructible::PostInit</a> </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="classinfact_1_1_environment.html">Environment</a> *&#160;</td>
          <td class="paramname"><em>env</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const string &amp;&#160;</td>
          <td class="paramname"><em>init_str</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td><code> [inline, virtual]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Does any additional initialization after an instance of this class has been constructed, crucially giving access to the <a class="el" href="classinfact_1_1_environment.html">Environment </a> that was in use and modified during construction by the <a class="el" href="classinfact_1_1_factory.html#a8b2771ba4fac39a71cb1d0156ddba7b6">Factory::CreateOrDie </a> method. </p>
<dl class="params"><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">env</td><td>the environment in use during construction by the <a class="el" href="classinfact_1_1_factory.html#a8b2771ba4fac39a71cb1d0156ddba7b6">Factory::CreateOrDie </a> method </td></tr>
    <tr><td class="paramname">init_str</td><td>the entire string used to initialize this object (for example, <code><a class="el" href="classinfact_1_1_person_impl.html" title="A concrete implementation of the Person interface that can be constructed by a Factory (because of th...">PersonImpl</a>(name("Fred"))</code>) </td></tr>
  </table>
  </dd>
</dl>

<p>Reimplemented in <a class="el" href="classinfact_1_1_sheep.html#a69f798764ffea946753bd06e678407cf">infact::Sheep</a>.</p>

<p>Definition at line <a class="el" href="factory_8h_source.html#l00583">583</a> of file <a class="el" href="factory_8h_source.html">factory.h</a>.</p>

</div>
</div>
<a class="anchor" id="a1c186ded6db298b7a84e5767e87c740f"></a><!-- doxytag: member="infact::FactoryConstructible::RegisterInitializers" ref="a1c186ded6db298b7a84e5767e87c740f" args="(Initializers &amp;initializers)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">virtual void <a class="el" href="classinfact_1_1_factory_constructible.html#a1c186ded6db298b7a84e5767e87c740f">infact::FactoryConstructible::RegisterInitializers</a> </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="classinfact_1_1_initializers.html">Initializers</a> &amp;&#160;</td>
          <td class="paramname"><em>initializers</em></td><td>)</td>
          <td><code> [inline, virtual]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Registers data members of this class for initialization when an instance is constructed via the <a class="el" href="classinfact_1_1_factory.html#a8b2771ba4fac39a71cb1d0156ddba7b6">Factory::CreateOrDie </a> method. </p>
<p>Adding a data member for initialization is done via the templated <a class="el" href="classinfact_1_1_initializers.html#a33d96794d73289dd072351a8fa269728">Initializers::Add </a> method. Please see <a class="el" href="classinfact_1_1_person_impl.html#a289e8cb9cedc6c8c42d0ae743b014e51">infact::PersonImpl::RegisterInitializers</a> for an example implementation.</p>
<dl class="params"><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">initializers</td><td>an object that stores the initializers for various data members of this class that can be initialized by the <a class="el" href="classinfact_1_1_factory.html#a8b2771ba4fac39a71cb1d0156ddba7b6">Factory::CreateOrDie </a> method</td></tr>
  </table>
  </dd>
</dl>
<dl class="see"><dt><b>See also:</b></dt><dd><a class="el" href="classinfact_1_1_initializers.html#a33d96794d73289dd072351a8fa269728" title="This method is the raison d&#39;etre of this class: a method to make it easy to add all supported types o...">infact::Initializers::Add</a> </dd></dl>

<p>Reimplemented in <a class="el" href="classinfact_1_1_human_pet_owner.html#a60908d8d6c4b89d353c8a487992ea76b">infact::HumanPetOwner</a>, <a class="el" href="classinfact_1_1_sheep.html#a5fc9522fe9d8cb71ef61ddb732aff63f">infact::Sheep</a>, <a class="el" href="classinfact_1_1_cow.html#a8fbdb40e5f983cd20f2caa15b72a227b">infact::Cow</a>, <a class="el" href="classinfact_1_1_person_impl.html#a289e8cb9cedc6c8c42d0ae743b014e51">infact::PersonImpl</a>, and <a class="el" href="classinfact_1_1_date_impl.html#ae20654d42981513aa0bf03d89e103457">infact::DateImpl</a>.</p>

<p>Definition at line <a class="el" href="factory_8h_source.html#l00570">570</a> of file <a class="el" href="factory_8h_source.html">factory.h</a>.</p>

</div>
</div>
<hr/>The documentation for this class was generated from the following file:<ul>
<li>src/infact/<a class="el" href="factory_8h_source.html">factory.h</a></li>
</ul>
</div><!-- contents -->
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
<a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(0)"><span class="SelectionMark">&#160;</span>All</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(1)"><span class="SelectionMark">&#160;</span>Classes</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(2)"><span class="SelectionMark">&#160;</span>Namespaces</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(3)"><span class="SelectionMark">&#160;</span>Files</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(4)"><span class="SelectionMark">&#160;</span>Functions</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(5)"><span class="SelectionMark">&#160;</span>Variables</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(6)"><span class="SelectionMark">&#160;</span>Typedefs</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(7)"><span class="SelectionMark">&#160;</span>Enumerations</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(8)"><span class="SelectionMark">&#160;</span>Enumerator</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(9)"><span class="SelectionMark">&#160;</span>Defines</a></div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>



<hr class="footer"/><address class="footer"><small>
Generated on Wed Apr 23 2014 10:07:53 for InFact by &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.7.6.1
</small></address>

</body>
</html>
